<?php
/**
 *
 * Contact Parts
 * @var unknown_type
 */
use Fox\Common\Customer;
use Fox\Html\Anchor;
$id = Xview::instance()->val("customerid");
$block = new Fox\Html\Block("bPartners");
$grid = new Fox\Grid("gPartners");
$grid->fieldcat(array('partnerid','role','name1','function','phone1',array('email','email1'),'defaultflag'));
$grid->SetInput(true,true,true,false);
$grid->setFieldAttr(array('partnerid','role','name1','function','phone1','email1'),"SetInput",false);
$grid->setFieldAttr("partnerid","SetHidden",true);
$grid->setFieldAttr(array('partnerid','role','name1','function','phone1','email1'),"SetHiddenInput",true);
$grid->fieldcat()->field("defaultflag")
->SetInput(true);
$grid->fieldcat()->field("name1")
->setAnchor(new Anchor("?mod=customer&act=update&",array("customerid" => 'partnerid'),"_blank"));
$grid->o_bmenu->items["delln"]->label("Supprimer");
$grid->add(new Fox\Html\Button("add","FoxDisplay('addContact','?mod=customer&act=partners&sac=add&customerid=$id',null,'InputSerialize(\'bPartners\')')",Msg(Customer::BUNDLE_NAME,39)));

$block->add($grid);
return $block;